package com.cn.ycy.controller;

import com.cn.ycy.dto.IdTooLongReq;
import com.cn.ycy.dto.IdTooLongRes;
import com.cn.ycy.dto.ResResult;
import com.cn.ycy.utils.JsonUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;


@RestController("idtolong")
public class IdTooLongTestController {

    Logger LOGGER = LoggerFactory.getLogger(IdTooLongTestController.class);

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public ResResult<IdTooLongRes> add(@RequestBody IdTooLongReq bizRequest) {

        LOGGER.info(JsonUtil.toJson(bizRequest));
        //模拟一个很长的long
        IdTooLongRes res = new IdTooLongRes();
        res.setId(3277691898583105536L);
        res.setId(99007199254740993L);
        ResResult<IdTooLongRes> idTooLongResResResult = new ResResult<IdTooLongRes>(res);
        return idTooLongResResResult;
    }

}
